|
![](/i/fill.gif) |
Hi again Mike,
Yeah, but, let me sometime to think a bit more. I will tray your answer
later, I think that I'm starting to understand it.
Fisrt I'm going to tray one of your exemples from your website, I think that
could work properly and then I will study your post.
Surely your answer is completly correct and I prefer to see it later.
Thank your ver much for your help.
I will explain me results later :).
Best regards,
Oleguer
news:OOe### [at] econym demon co uk...
> Wasn't it Oleguer Vilella who wrote:
>>I want a function to make
>>the surface go up and go down. I think a spline would be a good idea.
>>
>>What do you think Mike?
>
> Perhaps something like this:
>
>
> #version 3.6;
>
> global_settings {assumed_gamma 1.0}
>
> camera {location <0,50,-160> look_at <0,0,0>}
>
> background {rgb 1}
>
> light_source {<-30, 100, -30> color rgb 1}
>
> // ----------------------------------------
>
> #include "colors.inc"
>
> #declare S = function {
> spline {
> linear_spline
> -1.0, < 0.5, 0, 0>,
> -0.5, < 0, 0, 0>,
> 0.01,< 0.2, 0, 0>,
> 0.5, <-0.2, 0, 0>,
> 1, <-0.2, 0, 0>
> }
> }
>
> #declare Length = 100;
> #declare Height = 50;
> #declare Thickness = 10;
>
> #declare Q = function {y - Height*S(x/Length).x}
>
> isosurface {
> function { abs(Q(x,y,z)) - Thickness }
> max_gradient 2
> contained_by{box{ -<Length, Height+Thickness, Thickness>
> <Length, Height+Thickness, Thickness> }}
> pigment { color Green}
> finish { ambient 0.2 diffuse 0.8 phong 1 }
> }
>
>
> This is rigged for the container box to just fit as long as the spline
> values stay between -1.0 and +1.0.
>
>
> --
> Mike Williams
> Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |